package jp.ne.hatena.d.digitalsoul.warikan.actions

import java.io._
import java.util._

import jp.ne.hatena.d.digitalsoul.warikan.pages.items._
import jp.ne.hatena.d.digitalsoul.warikan.repositories._

class SlopeListAction extends Serializable {
	
	def createSlopeListItems:List[SlopeListItem] = {
		
		var slopeListItems = new ArrayList[SlopeListItem]
			
    	val slopes = SlopeRepository.forAll
    	for (slope <- slopes) {
    		val slopeListItem = new SlopeListItem
    		slopeListItem.slopeId = slope.id.toString
    		slopeListItem.slopeName = slope.name
    		slopeListItems.add(slopeListItem)
    	}
		slopeListItems
    
    }

}